package bmatch.tech.todo.service.impl;

import bmatch.tech.todo.dao.BmUserMapper;
import bmatch.tech.todo.model.LoginUser;
import bmatch.tech.todo.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program:todo
 * @author:LinJinhao
 * @create:2019-01-23 17:29
 **/
@Service
public class LoginServiceImpl implements LoginService {

	@Autowired
	private BmUserMapper bmUserMapper;

	//去数据库进行邮箱和加密后的密码匹配
	@Override
	public LoginUser login(String email, String pwd) {

		LoginUser loginUser = bmUserMapper.selectByEmailAndPwd(email,pwd);

		return loginUser;
	}

}
